Completed
Push — develop ( a22b60...304faf )
by Reüel
11:40
created

module.exports   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 1
rs 10
c 1
b 0
f 0
1
/**
2
 * Grunt tasks.
3
 *
4
 * @author    Pronamic <[email protected]>
5
 * @copyright 2005-2018 Pronamic
6
 * @license   GPL-3.0-or-later
7
 * @package   Pronamic\WordPress\Pay\Extensions\MemberPress
8
 */
9
10
module.exports = function( grunt ) {
11
	require( 'load-grunt-tasks' )( grunt );
12
13
	// Project configuration.
14
	grunt.initConfig( {
15
		// Package.
16
		pkg: grunt.file.readJSON( 'package.json' ),
17
18
		// JSHint.
19
		jshint: {
20
			all: [ 'Gruntfile.js', 'composer.json', 'package.json' ]
21
		},
22
23
		// PHP Code Sniffer.
24
		phpcs: {
25
			application: {
26
				src: [
27
					'**/*.php',
28
					'!node_modules/**',
29
					'!vendor/**',
30
					'!wp-content/**'
31
				]
32
			},
33
			options: {
34
				bin: 'vendor/bin/phpcs',
35
				standard: 'phpcs.xml.dist',
36
				showSniffCodes: true
37
			}
38
		},
39
40
		// PHPLint.
41
		phplint: {
42
			all: [ 'src/**/*.php' ]
43
		},
44
45
		// PHP Mess Detector.
46
        phpmd: {
47
            application: {
48
                dir: 'src'
49
            },
50
            options: {
51
                bin: 'vendor/bin/phpmd',
52
                exclude: 'node_modules',
53
                reportFormat: 'xml',
54
                rulesets: 'phpmd.xml.dist'
55
            }
56
        },
57
58
		// PHPUnit.
59
        phpunit: {
60
            options: {
61
                bin: 'vendor/bin/phpunit'
62
            },
63
            application: {}
64
        }
65
	} );
66
67
	// Default task(s).
68
	grunt.registerTask( 'default', [ 'jshint', 'phplint', 'phpmd', 'phpcs' ] );
69
};
70